@extends('Admin.layout.layout')
@section('content')

<div class="row">
    <div class="col-lg-12">
        <h1 class="page-header">分类添加</h1>
    </div>
    <!-- /.col-lg-12 -->
</div>
@if (count($errors) > 0 )
    <div class="alert alert-danger">
    @foreach ($errors->all() as $error)
        <li>{{ $error }}</li>
    @endforeach
    </div>
@endif    
<center>
<div style="width:600px">
<form action="{{url('/admin/cate/insert')}}" method="post">
<div class="form-group">
    <label>分类选择</label>
    <select name="pid" class="form-control">
        <option value= "0" >顶级分类</option>
        @foreach($cate as $k=>$v)
        <option value= "{{$v->id}}" >{{$v->name}}</option>
        @endforeach
    </select>
</div>
<div class="form-group">
    <label>分类名</label>
    <input name="name" class="form-control" placeholder="分类名称">
</div>
{{ csrf_field() }}
<button class="btn btn-primary btn-lg btn-block">提交</button>
</form>
</div>
</center>
@endsection